/** =====================  查询首页信息  ===================== **/

// 查询2条tableName表的信息  -有指定城市的
module.exports.sqlQueryHomeDatas = function (tableName) {
  return `SELECT * FROM ${tableName} WHERE city_id = ? LIMIT 2`
}

// 随机查询tableName表2条信息 -全部城市
module.exports.sqlQueryHomeDatasAll = function (tableName) {
  return `SELECT * FROM ${tableName} WHERE id =? || id=?`
}


/** =====================  查询详细页信息  ===================== **/
// 查询tableName表的？id个数据
module.exports.sqlQueryDetailDatas = function (tableName) {
  return `SELECT * FROM ${tableName} WHERE id =?`
}

/** =====================  查询列表页信息  ===================== **/
// 查询tableName表的所有数据
module.exports.sqlQueryTableDatasAll = function (tableName) {
  return `SELECT * FROM ${tableName}`
}

// 查询？表的？城市数据
module.exports.sqlQueryTableDatas = function (tableName) {
  return `SELECT * FROM ${tableName} WHERE city_id = ? `
}


